<extend name="Layout/index" />
<block name="breadcrumb-01">
	<li>
		<i class="icon-home home-icon"></i>
		<a href="#">首页</a>
	</li>
	<li class="active">搜索结果</li>

</block>

<block name="breadcrumb-02">
	<h1>
		<a href="<{:U('Addbook/index')}>">返回搜索</a>
		<small>
			<i class="icon-double-angle-right"></i>
			 搜索列表
		</small>
		<form action="<{:U('Addbook/index')}>" method='post' class="form-horizontal">
			<input type="text" name="keyword"  placeholder="请填写小说名">
			<button type="submit height:50px" class=" btn-default">搜索</button>
		</form>
	</h1>
	
</block>
<block name='main' >
		<table class="table table-striped table-bordered table-hover">
			<thead>
			 <tr>
				<th>bookid</th>
				<th>小说名</th>
				<th>作者</th>
				<th>操作</th>
			 </tr>
			</thead>
			<tbody>
			<volist name="book" id="vo">
					<tr>
						<td><{$vo.id}></td>
						<td><{$vo.name}></td>
						<td><{$vo.author}></td>
						<th>						
							<a href="<{:U('Addbook/add',array('bookid'=>$vo['id']))}>">添加图书</a>
						</th>
					</tr>
			</volist>
			</tbody>
		</table>
		<center>
			 <button onclick="last()">上一页</button>  
			 <button onclick="next()">下一页</button>  
		</center>
		<script>

			function next(){ 
				window.location.href="<{:U('Addbook/index',array('keyword'=>$keyword,'id'=>$page+1))}>"; 				  
			} 
			
			function last(){
				// if(<{$book->id}>) 
				window.location.href="<{:U('Addbook/index',array('keyword'=>$keyword,'id'=>$page-1))}>"; 

			}
		</script>
		
</block>